package org.feng.demofx.pages;

import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import org.feng.demofx.sys.PageNodeKey;
import org.feng.demofx.sys.PageNodeRender;
import org.feng.demofx.util.StyleUtil;

/**
 * 主页
 *
 * @author feng
 */
@PageNodeKey(value = MainPage.PAGE_KEY, pageName = "主页面", order = -1)
public class MainPage implements PageNodeRender {

    public static final String PAGE_KEY = "main";

    @Override
    public Node render(Pane pane) {
        VBox vbox = new VBox();
        vbox.setAlignment(Pos.CENTER);
        Label test = new Label("主页面");
        StyleUtil.setFont(test, Color.BLACK, 20);
        vbox.getChildren().add(test);
        return vbox;
    }
}
